Get Ruby's SMIE code to pass the test suite.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 5 Oct 2013 18:37:08 +0000 (14:37 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 5 Oct 2013 18:37:08 +0000 (14:37 -0400)
commitbeaa0f08c18a4cb99f03c418f5eaa4ec3a46f642
treeb29b7d6f51de1b1055e8eba993a0c8943f1e357b
parent7d364f4fee646f3e6c18bd4479d5a05ead9a7f91
Get Ruby's SMIE code to pass the test suite.
* lisp/progmodes/ruby-mode.el (ruby-use-smie): Change default.
(ruby-comment-column): Follow the global default, by default.
(ruby-smie-grammar): Add assignment syntax.
(ruby-smie--implicit-semi-p): No implicit semi-colon after an
open-paren, a comma, or a \.
(ruby-smie--forward-token, ruby-smie--backward-token): Handle heredocs,
and line continuations.
(ruby-smie-rules): Adjust handling of open-paren, now that it's never
followed by implicit semi-colons.  Add rule for string concatenation
and for indentation at BOB.
(ruby-forward-sexp, ruby-backward-sexp): Adjust for when smie is in use.

* lisp/emacs-lisp/smie.el (smie-next-sexp): Don't go back to pos before
calling next-sexp, since next-token may have skipped chars which
next-sexp doesn't know should be skipped!

* test/indent/ruby.rb: Port a few cases from automated/ruby-mode-tests.el.
Adjust indentation of continued line to the new SMIE behavior.
lisp/ChangeLog
lisp/emacs-lisp/smie.el
lisp/progmodes/ruby-mode.el
test/ChangeLog
test/indent/ruby.rb